package com.express.gateway.spi;

import com.express.gateway.manage.entity.Api;
import com.express.gateway.spi.policy.ServerProxyPollingPolicy;
import com.express.gateway.manage.options.ServerEntranceHttpOptions;
import io.vertx.core.http.HttpClient;

public abstract class AbsProxyServerHandler implements ProxyServerHandler {
    /**
     * 应用的名称
     */
     protected final String appName;
    /**
     * 有否使用后置处理器
     */
     final boolean isNext;
    /**
     * API配置
     */
     final Api api;
    /**
     * 后端服务策略
     */
     final ServerProxyPollingPolicy policy;
    /**
     * HTTP/HTTPS服务类型的配置
     */
     final ServerEntranceHttpOptions servOptions;
    /**
     * HTTP客户端
     */
     final HttpClient httpClient;


    protected AbsProxyServerHandler(String appName, boolean isNext, Api api, ServerProxyPollingPolicy policy, ServerEntranceHttpOptions servOptions, HttpClient httpClient) {
        this.appName = appName;
        this.isNext = isNext;
        this.api = api;
        this.policy = policy;
        this.servOptions = servOptions;
        this.httpClient = httpClient;
    }
}
